﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Arch.Intercep;

namespace Arch.Aspects
{
    [AttributeUsage(AttributeTargets.Class)]
    public class IncludesAttribute : Attribute, IRepositoryPropertyInterceptor
    {
        public string DefaultOrder { get; set; }
        public bool IsPostOrder { get; set; }
        public string DefaultIncludes { get; set; }

        public IncludesAttribute()
        {
            Targets = ActionTarget.InfrastructureLoaded;
        }
        
        public IncludesAttribute(string includes)
            : this()
        {
            DefaultIncludes = includes;
        }

        private static readonly string[] FixedProperties = new string[] { "DefaultIncludes" };
        public IEnumerable<string> Properties { get { return FixedProperties; } }

        public ActionTarget Targets { get; protected set; }
    }
}
